package com.starview.platform.data.type;

public interface ITypeVisitor
{
  /**
   * Apply visitor to a 'simple type'.
   * 
   * @param t
   */
  void visitSimpleType(Type t);

  /**
   * Apply the visitor to a type expression. This includes most concrete types, including function
   * types, record types, tuple types, etc.
   * 
   * @param t
   */
  void visitTypeExp(TypeExp t);

  /**
   * Apply the visitor to an interface type;
   * 
   * @param t
   */
  void visitTypeInterface(TypeInterfaceType t);

  /**
   * Apply the visitor to a type variable. Note that it is guaranteed that the type variable is not
   * bound to a concrete type; but it may have type constraints applied to it.
   * 
   * @param v
   */
  void visitTypeVar(TypeVar v);
  
  /**
   * Apply the visitor to an existentially  quantified type.
   * 
   * @param t
   */
  void visitExistentialType(QuantifiedType t);

  /**
   * Apply the visitor to a universally quantified type.
   * 
   * @param t
   */
  void visitUniversalType(UniversalType t);
}
